<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="shortcut icon" href="<?php echo $this->baseUrl('public/images/favicon.ico')?>" />
<title>留言列表</title>
<style type="text/css">
.listdiv table{
        border-collapse:collapse;
        border-spacing:0;
        border:1px solid #ccc;
    }
a{color:#17387D;text-decoration:none;}
a:hover{color:orange;} 
.listdiv table td{
        border-color:#ccc;
        padding:5px 0;
        text-align:center;
    }
  .create {
 background:url("<?php echo $this->baseUrl()?>/public/images/create_02.gif") no-repeat scroll 0 -1px transparent;
 height:19px;
 padding-left:15px;
 width:75px;
}

.searchinput{
	border-right-width: 0px;
	padding-left: 3px;
	width: 168px;
	font-family: arial;
	float: left;
	border-top-width: 0px;
	border-bottom-width: 0px;
	color: #636365;
	margin-left: 4px;
	font-size: 8pt;
	vertical-align: middle;
	border-left-width: 0px;
	margin-right: 3px;
}
.tab_search{
	border-bottom: #cccccc 1px solid;
	border-left: #cccccc 1px solid;
	height: 25px;
	border-top: #cccccc 1px solid;
	border-right: #cccccc 1px solid;

}
.searchaction{
	width: 21px;
	float: left;
	height: 17px;
}	
</style>
</head>
<body>
<div class="content" style="width:80%;margin:0 auto;">
<div class="search_add">
<table border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td>
	<form name="search" method="post">
	<table border="0" cellpadding="0" cellspacing="0" class="tab_search">
		<tr>
			<td>
				<input type="text" name="searchinput" title="Search" class="searchinput" id="searchinput" onkeydown="if (event.keyCode==13) {}" onblur="if(this.value=='')value='- 请输入搜索内容 -';" onfocus="if(this.value=='- 请输入搜索内容 -')value='';" value="<?php echo $this->title ?>" size="10"/>
			</td>
			<td>
				<input type="image" width="21" height="17" class="searchaction" onclick="if(document.forms['search'].searchinput.value=='- 请输入搜索内容 -'){document.forms['search'].searchinput.value='';}if(document.forms['search'].searchinput.value !=''){location.href='<?php echo $this->baseUrl() ?>/test/search/k/'+encodeURI(document.forms['search'].searchinput.value);return false;}else{document.forms['search'].searchinput.value='- 请输入搜索内容 -';return false;}" alt="搜索" src="<?php echo $this->baseUrl()?>/public/images/search_01.gif" border="0" hspace="2"/>
			</td>
		</tr>
	</table>
	</form>
</td>
<?php if(isset($this->isSearch)&&$this->isSearch == 1):?>
<td style="width:10%;">
  <span style="float:right;display:inline"><a href="<?php echo $this->baseUrl("test/index/") ?>"><font size='2'>查看全部</font></a></span>
</td>
<?php endif; ?>
<td style="width:400px;">
<span style="float:right;display:inline"><a href="<?php echo $this->baseUrl ?>/test/add/" class="create"><font size='2'>发布留言</font></a></span>
</td>
</tr>
</table>
<div>
<br/>
<div class="listdiv">
<table border='1' align="center">

	  <tr>
	    <th class="title" colspan="3">留言列表显示</th>
	  </tr>

	<tr>
	    <th style="width:20%;">标题</th>
		<th style="width:400px;">内容</th>
		<th style="width:20%;">操作</th>
	</tr>
        <?php if(count($this->paginator)): ?>
	<?php foreach($this->paginator as $message): ?>
	   <tr>
	    <th><?php echo $message['title']; ?></th>
		<td><?php echo $message['content']; ?></td>
		<td>
			<a href="<?php echo $this->baseUrl ?>/test/edit/id/<?php echo $message['id']; ?>"><font size="2">编辑</font></a><font size="2">|</font><a href="<?php echo $this->baseUrl ?>/test/del/id/<?php echo $message['id']; ?>"><font size="2">删除</font></a>
		</td>
	  </tr>
	  <?php endforeach; ?>
          <?php endif; ?>
          
          <tr>
	    <td colspan="3"><?php echo $this->paginationControl($this->paginator, 'Elastic', 'pagelist_min_new.phtml'); ?></td>
	  </tr>

	</table>
	
</div>
</div>	
<!--
	<?php if(2==2):?>
	----------------
	<?php else: ?>
	================
	<?php endif; ?>
-->
</body>
</html>